<template>
    <div>
        <van-search v-model="value" show-action label="北京" placeholder="请输入搜索关键词" @search="onSearch"></van-search>
    </div>
</template>

<script setup>
//  import {useRouter} from 'vue-router'
//  const router =useRouter()
// const onSearch=()=>{
//     console.log('回车');
//     router.push('/sous')
    
// }
import {  useRouter } from 'vue-router';
const router =useRouter()
const onSearch=()=>{
    console.log('回车');
    router.push('/sous')
}
</script>

<style lang="scss" scoped></style>